home *** CD-ROM | disk | FTP | other *** search
- head 1.2;
- access ;
- symbols ;
- locks ; strict;
- comment @ * @;
-
-
- 1.2
- date 88.08.16.11.16.57; author mendel; state Exp;
- branches ;
- next 1.1;
-
- 1.1
- date 88.04.27.09.01.50; author brent; state Exp;
- branches ;
- next ;
-
-
- desc
- @Statistics defs
- @
-
-
- 1.2
- log
- @
- @
- text
- @/*
- * stat.h --
- *
- * Data structure declartions for recording statistics from the
- * Internet protocol modules.
- *
- * Copyright 1987 Regents of the University of California
- * All rights reserved.
- * Permission to use, copy, modify, and distribute this
- * software and its documentation for any purpose and without
- * fee is hereby granted, provided that the above copyright
- * notice appear in all copies. The University of California
- * makes no representations about the suitability of this
- * software for any purpose. It is provided "as is" without
- * express or implied warranty.
- *
- *
- * $Header: stat.h,v 1.1 88/04/27 09:01:50 brent Exp $ SPRITE (Berkeley)
- */
-
- #ifndef _IPS_STAT
- #define _IPS_STAT
-
- #include "spriteTime.h"
- #include "netInet.h"
-
- /* constants */
-
- /* data structures */
-
- typedef struct {
-
- Time startTime; /* Time when server started. */
-
- struct {
- unsigned int totalRcv; /* Total # of packets received. */
- unsigned int shortPacket; /* Packet len. was smaller than the
- * min. IP header size. */
- unsigned int shortHeader; /* The headerLen value in the header
- * wass smaller that the min. header
- * size. */
- unsigned int shortLen; /* The headerLen was bigger than the
- * totalLen. */
- unsigned int badChecksum; /* Checksum didn't match recomputed
- * value.*/
- unsigned int fragsRcv; /* # of packets received that were
- * fragmented when they arrived. */
- unsigned int fragsDropped; /* # of fragments received that were
- * dropped because they were replaced
- * by other fragments. */
- unsigned int fragsTimedOut; /* # of fragments received that were
- * dropped because the other fragments
- * didn't arrive before the timeout.*/
- unsigned int fragTimeouts; /* # of fragments reassembly timeouts.*/
- unsigned int fragsReass; /* # of fragments that were
- * reasssembled. */
- unsigned int forwards; /* # of received packets that weren't
- * for us and had to be forwarded. */
- unsigned int cannotForward; /* # of packets to be forwarded but
- * couldn't determine who to send to. */
-
- unsigned int wholeSent; /* # of unfragmented packets sent. */
- unsigned int fragOnSend; /* # of packets that were fragmented
- * before sent because they were too
- * big to send whole. */
- unsigned int fragsSent; /* # of fragments sent. */
- unsigned int dontFragment; /* # of packets to be sent that were
- * too big but couldn't be fragmented
- * (DONT_FRAGMENT was set). */
- } ip;
-
- struct {
- unsigned int total;
- unsigned int shortLen;
- unsigned int badChecksum;
- unsigned int badType; /* # of packets that had a bad ICMP
- * request type. */
- unsigned int badCode; /* # of packets with a bad ICMP code. */
- unsigned int redirectSent; /* # of "redirect" packets sent out. */
-
- unsigned int inHistogram[NET_ICMP_MAX_TYPE];
- /* histogram of request types in
- * incoming ICMP packets. */
- unsigned int outHistogram[NET_ICMP_MAX_TYPE];
- /* histogram of request types in
- * outgoing ICMP packets. */
- } icmp;
-
- struct {
- struct {
- unsigned int total;
- unsigned int dataLen; /* # of bytes sent. */
- } send;
- struct {
- unsigned int total; /* total # received. */
- unsigned int dataLen; /* total # of valid bytes
- * received. */
- unsigned int shortLen; /* bad length in header. */
- unsigned int badChecksum; /* bad header checksum. */
- unsigned int daemon; /* destined for rwhod, sunrpc
- * and route daemons. */
- unsigned int accepted; /* a client wants the packet.*/
- unsigned int acceptLen; /* # of bytes wanted. */
- } recv;
- } udp;
-
- struct {
- unsigned int connAttempts; /* connections initiated */
- unsigned int accepts; /* connections accepted */
- unsigned int connects; /* connections established */
- unsigned in /* # of bytes copied. */
- } buffer;
- } sock;
-
- struct {
- unsigned int dispatchLoop; /* # of times Fs_Dispatch is called. */
- unsigned int routeCalls; /* # of times Rte_FindOutNet is
- * called. */
- unsigned int routeCacheHits; /* # of times the cache in
- * Rte_FindOutNet is used. */
- } misc;
-
- } Stat_Info;
-
- extern Stat_Info stats;
- extern int Stat_PrintInfo();
-
- #endif _IPS_STAT
- @
-
-
- 1.1
- log
- @Initial revision
- @
- text
- @d18 1
- a18 1
- * $Header: stat.h,v 6.0 87/09/08 15:58:33 andrew Stable $ SPRITE (Berkeley)
- d24 1
- a24 1
- #include "time.h"
- @
-